﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;

namespace searchandextract
{
    class Program
    {
        [STAThread]
        static void Main(string[] args)
        {
            searchandextract se;
            if (args.Length == 0)
            {
                Console.WriteLine("Usage: searchandextract -l \".\" -f \"*.txt|*.lst\" -r \"pattern\"");
                Console.WriteLine("Optional: -s to search subfolders, -c to copy to clipboard");
            } 
            else if (args.Length == 1)
            {
                se = new searchandextract(new string[] {"-l", ".\\test", "-f", "*.txt", "-r", @"([0-9]{3}-[0-9]{3})", "-c"});
                se.search();
            }
            se = new searchandextract(args);
            se.search();
        }
    }
}
